package com.cham.pinglun.service.impl;

import com.cham.pinglun.dto.PinglunInfo;
import com.cham.pinglun.entity.Pinglun;
import com.cham.pinglun.mapper.PinglunMapper;
import com.cham.pinglun.service.PinglunService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author Howl-Xu
 * @version 1.0.0
 * @Description: 请描述一下这个类文件吧
 * @createTime 2020年03月31日 16:10:00
 */
@Service
public class PinglunServiceImpl implements PinglunService {

    @Resource
    private PinglunMapper pinglunMapper;

    @Override
    public void savePinglun(Pinglun pinglun) {
        pinglunMapper.savePinglun(pinglun);
    }

    @Override
    public List<PinglunInfo> getPinglunInfo(int videoId, int start, int pageSize) {
        return pinglunMapper.getPinglunInfo(videoId,start,pageSize);
    }

    @Override
    public int getPinglunInfoCount(int videoId) {
        return pinglunMapper.getPinglunInfoCount(videoId);
    }
}
